package com.foreknow.dao;

import com.foreknow.bean.Guestbook;
import com.foreknow.util.Pagination;

import java.sql.SQLException;
import java.util.List;

public interface GuestbookDao {
    /**
     * 添加留言
     * @param gb
     * @return
     * @throws SQLException
     */
    public boolean addMessage(Guestbook gb)throws SQLException;

    /**
     * 查询所有留言信息
     * @return
     */
    public List<Object> getQueryAll()throws SQLException;

    /**
     * 删除
     * @param id
     * @return
     */
    public boolean delById(Integer id);

    /**
     * 分页查询(查询所有的留言信息)
     */
    public Pagination getGuestbookByPage(int pageSize, int pageNumber)throws SQLException;
}
